<?php foreach ($css as $cs): ?>
<?php use_stylesheet($cs->getCss()) ?>
<?php endforeach ?>

<?php foreach ($sujet as $sujets): ?>
<h2 align=center> <?php echo $sujets->getDiscussion()->getSujet() ?> </h2>
<?php endforeach; ?>
<table align="center" width='100%' cellpadding="15">
   <?php foreach ($pager->getResults() as $message): ?>
      <tr><td><table width='1000%' border='1'>
        <tr>
        <td width="250px" bgcolor=#b5b7b7>Posté par:  <?php echo $message->getAuteur()?></td>
        <td bgcolor='#00acc8'> <?php echo $message->getContenu() ?></td>
        </tr>
       </table></td></tr>
   <?php endforeach; ?>
</table>
  <?php if ($pager->haveToPaginate()): ?>
  <?php echo link_to('&laquo;', 'message/index?page='.$pager->getFirstPage().' & id_discussion='.$id_discussion) ?>
  <?php echo link_to('&lt;', 'message/index?page='.$pager->getPreviousPage().' & id_discussion='.$id_discussion) ?>
  <?php $links = $pager->getLinks(); foreach ($links as $page): ?>
  <?php echo ($page == $pager->getPage()) ? $page : link_to($page, 'message/index?page='.$page.' & id_discussion='.$id_discussion) ?>
  <?php if ($page != $pager->getCurrentMaxLink()): ?> - <?php endif ?>
  <?php endforeach ?>
  <?php echo link_to('&gt;', 'message/index?page='.$pager->getNextPage().' & id_discussion='.$id_discussion) ?>
  <?php echo link_to('&raquo;', 'message/index?page='.$pager->getLastPage().' & id_discussion='.$id_discussion) ?>
  <?php endif ?>
  <br><br>
  <a href="<?php echo url_for('message/new?id_discussion='.$id_discussion) ?>">Repondre</a>
